<% form_elements = [
  {name: "ha_type", type: "radio_small_cards", label: "Standby Count", required: "required", content_generator: ContentGenerator::Postgres.method(:ha_type)}
]

@option_tree, @option_parents = generate_postgres_options(flavor: @pg.flavor, location: @location)

pre_selected_values = {
  "flavor" => @pg.flavor,
  "location" => @location.ubid,
  "family" => Option::POSTGRES_SIZE_OPTIONS[@pg.target_vm_size].family,
  "size" => @pg.target_vm_size,
  "storage_size" => @pg.target_storage_size_gib,
  "ha_type" => @pg.ha_type
} %>

<%== render(
  "components/form/resource_creation_form",
  locals: {
    action: path(@pg),
    method: "PATCH",
    form_elements:,
    pre_selected_values:,
    option_tree: @option_tree,
    option_parents: @option_parents,
    mode: "update"
  }
) %>
